package edu.sctu.wangxiaoqiang.day20150524.textthree;

/**
 * Created by user25 on 2015/5/24.
 */
public class TextOne {

    Student student = new Student();
    int[] number = new int[2];



        public void getCourseOne() {

           for (int i = 0,num1 = 0; i < student.name1.length; i++) {
                if (student.name1[i]==student.name1[i+1]) {
                    num1++;
                    number[0] = num1;
                }
            }
            System.out.println("数字："+number[0]);



           for (int i = 0, num2 = 0; i < student.name1.length; i++) {
               if (student.name1[i] == "数学") {
                   num2++;
                   number[1] = num2;

               }
           }
            System.out.println("数字："+number[0]);



           for (int i = 0, num3 = 0; i < student.name1.length; i++) {
              if (student.name1[i] == "生物") {
                num3++;
                number[2] = num3;
            }
            }
            System.out.println("数字："+number[0]);


           for (int i = 0, num4 = 0; i < student.name1.length; i++) {
              if (student.name1[i] == "物理") {
                num4++;
                number[4] = num4;
            }
            }
            System.out.println("数字："+number[0]);

            for (int i = 0, num5 = 0; i < student.name1.length; i++) {
              if (student.name1[i] == "语文") {
                num5++;
                number[5] = num5;
            }
            }
            System.out.println("数字："+number[0]);
  }

}

